/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pa165.languageschoolpersistence.DAO;

import com.pa165.languageschoolpersistence.Exceptions.IllegalArgumentPersistenceException;
import com.pa165.languageschoolpersistence.Exceptions.ServiceFailureException;
import com.pa165.languageschoolpersistence.entities.Lector;
import com.pa165.languageschoolpersistence.entities.LevelofLanguage;
import java.util.List;

/**
 *
 * @author lexpenz
 */
public interface LevelOfLanguageDAO {

    /**
     * Method for adding LevelofLanguages. For conventions of a valid student
     * see LevelofLanguage entity. If a student is not in the database, it
     * returns the student added. If a student is already in the database, it
     * returns a null value.
     *
     * @param student student to be added.
     * @return Null if already in database, LevelofLanguage added instead
     * @throws IllegalArgumentPersistenceException if student is invalid
     * @throws ServiceFailureException if a problem during adding occurs.
     */
    public LevelofLanguage add(LevelofLanguage levofLang) throws IllegalArgumentPersistenceException, ServiceFailureException;

    /**
     * Method for removing LevelofLanguages. For conventions of a valid student
     * see LevelofLanguage entity.
     *
     * @param student student to be removed.
     * @throws IllegalArgumentPersistenceException if student is invalid
     * @throws ServiceFailureException is a problem during removal occurs or if
     * student is already in the database.
     */
    public void remove(LevelofLanguage levofLang) throws IllegalArgumentPersistenceException, ServiceFailureException;

    /**
     * Method for modifying LevelofLanguages. For conventions of a valid student
     * see LevelofLanguage entity.
     *
     * @param student student to be modified.
     * @return Modified LevelofLanguage.
     * @throws IllegalArgumentPersistenceException if student is invalid
     * @throws ServiceFailureException if a problem during adding occures or if
     * student is not in the database.
     */
    public LevelofLanguage modify(LevelofLanguage levofLang) throws IllegalArgumentPersistenceException;

    /**
     * Method for retrieving LevelofLanguages. For conventions of a valid
     * student see LevelofLanguage entity. Method gets student by input ID.
     *
     * @param id ID to be searched for.
     * @return Null if not in database, LevelofLanguage found instead
     * @throws IllegalArgumentPersistenceException if id is invalid(for details
     * see LevelofLanguage entity)
     * @throws ServiceFailureException if a problem during search occures.
     */
    public LevelofLanguage get(Long id) throws IllegalArgumentPersistenceException;

    /**
     * Method for retrieving LevelofLanguages for lector. For conventions of a
     * valid student see LevelofLanguage entity. Method gets all students.
     *
     * @param Lector lector, for whom
     * @return Empty list if no student , list of students found instead
     * @throws ServiceFailureException if a problem during search occures.
     */
    public List<LevelofLanguage> get(Lector lector) throws IllegalArgumentPersistenceException;
}
